from django.conf.urls.defaults import *
from django.conf import settings

# Enable admin.
from django.contrib import admin
admin.autodiscover()

import warper.views

urlpatterns = patterns('',
    (r'^$', warper.views.home),
    (r'^create/([\w\-]+)$', warper.views.create),
    (r'^status/([\w\-]+)$', warper.views.check_status),

    # Enable admin documentation.
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    # Enable admin.
    (r'^admin/', include(admin.site.urls)),
)

if settings.DEBUG:
  urlpatterns += patterns('',
      (r'^images/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': '/home/jack/src/street-view-planets/client/images'}),
      (r'^js/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': '/home/jack/src/street-view-planets/client/js'}),
      (r'^css/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': '/home/jack/src/street-view-planets/client/css'}),
      (r'^planet/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': '/home/jack/src/street-view-planets/planet'}),
  )
